home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Archive / Graphics / QuickDraw GX / GX->PostScript Sample / GXToPostScript / Font Handler / FontHandlerVariations.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.9 KB  |  57 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        FontHandlerVariations.h
  3.  
  4.      Contains:    QuickDraw GX to PostScript conversion code.
  5.                          File contains private data structures and definitions 
  6.                         for the font handler variations handling code
  7.  
  8.      Version:    Technology:    Quickdraw GX 1.1.x
  9.       
  10.      Copyright:    © 1991-1997 by Apple Computer, Inc., all rights reserved.
  11. */
  12.  
  13. /***********************
  14.  
  15.     struct: TFHSnapShot
  16.     
  17.     This structure is for the database
  18.     of font snapshots.
  19. *************************/
  20. typedef struct {
  21.  
  22.     fhFont                            snapShotFont;        // This long will be the font reference for a snapshot  (also id in collection)
  23.     gxFont                            theFont;                // The actual font reference.  (This is the collection tag)
  24.     long                                dbIndex;                // The index of the variation/bit combination in the database.
  25.                                                                             //        may be value from enumeration dbIndexSentinels below.
  26. } TFHSnapShot;
  27.  
  28. enum {
  29.     eMainBits = 0,                                            // signifies snapshot uses main bit array
  30.     eNotPresent = -1                                        // signifies this varitation/bit combination is not in the font database
  31. };
  32.  
  33. /************************* Private routines **************************/
  34.  
  35. OSErr FHAddFontSnapShot(TFontHandlerHdl hFHRec, gxFont theFont, long dbIndex, fhFont *snapshotID);
  36.  
  37. gxFont FHGetSnapShotFont(TFontHandlerHdl hFHRec, fhFont snapShotFont, long *dbIndex);
  38.  
  39. long FHCountSnapshots(TFontHandlerHdl hFHRec);
  40.  
  41. OSErr FHGetIndexedSnapshot(TFontHandlerHdl hFHRec, long index, fhFont *theFont);
  42.  
  43. Boolean    FHEqualVariations(long num, gxFontVariation* v1, gxFontVariation* v2);
  44.  
  45.  
  46.  
  47. /** Intra segment prototypes for these **/
  48.  
  49. #if GENERATINGCFM
  50.     #define _FontHandlerGetStyleFont                             FontHandlerGetStyleFont
  51.     #define _FontHandlerGetStyleFontVariations        FontHandlerGetStyleFontVariations
  52. #endif
  53.  
  54. OSErr _FontHandlerGetStyleFont(TFontHandlerContext context, gxStyle theStyle, fhFont *theFont);
  55.  
  56. OSErr _FontHandlerGetStyleFontVariations(TFontHandlerContext context, gxStyle theStyle, long *count, gxFontVariation variations[]);
  57.